<?php
class Application_Form_Usuario extends Zend_Form
{ 
    public function init()
    {
        $this->setName('UsuarioForm');
        $user = new Zend_Form_Element_Text ('nuevoUsuario');
        $user->setLabel('Usuario:');
        $user->setRequired(true);
        $user->setAttrib('maxlength','30');
        $user->setErrorMessages(array('messages' => 'El campo Usuario solo puede contener numeros'));
        $user->setAttrib('size', 10);
        
        $password = new Zend_Form_Element_Password ('nuevoPassword');
        $password->setLabel('Password:');
        $password->setRequired(true);
        $password->setAttrib('maxlength','30');
        $password->setErrorMessages(array('messages' => 'El campo Password solo puede contener numeros'));
        $password->setAttrib('size', 10);
       
        $email = new Zend_Form_Element_Text('nuevoEmail');
        $email->setLabel('Email:');
        $email->setRequired(true);
        $email->setAttrib('maxlength','30');
        $email->setErrorMessages(array('messages' => 'El campo Email deve contener un email valido'));
        $email->setAttrib('size', 10);
        
        $submit = new Zend_Form_Element_Submit('crearUsuario');
        $submit->setLabel('Crear Usuario');
        
        $this->addElements(array($user,$password,$email,$submit));

    }
 
}